<template>
  <div class="component-a">
    <h3>组件 A</h3>
    <p>这是组件A的内容区域</p>
    <button @click="sendMessage">发送消息到父组件</button>
  </div>
</template>

<script setup>
import { defineEmits } from 'vue'
const emits = defineEmits(['message'])

const sendMessage = () => {
  emits('message', '来自组件A的问候！')
}
</script>

<style scoped>
.component-a {
  padding: 20px;
  background-color: #e3f2fd;
  border-radius: 8px;
  margin-top: 15px;
}
</style>